<?php echo form_open('admin/modifier_profile/'.$profile_data->id, array('id' => 'register')); ?>
<div id="content">
    <?php if ($this->session->flashdata('error')): ?>
        <div class="affiche_erreur">
        <?php echo $this->session->flashdata('error'); ?>
    </div>
    <?php endif; ?>
        <div id="title_content"><?php echo lang("edit_profile")." Profile"?></div>
    <?php echo form_open_multipart('admin/modifier_profile/'.$profile_data->id); ?>
        <table class="form_content" width="100%">
        <tr>
            <td><?php echo lang('user_name'); ?></td>
            <td>
               <input type="text" class="form_input" name="user_name" size="35" maxlength="40" value="<?php echo set_value('user_name', $profile_data->user_name); ?>" readonly="readonly"/></td>
        </tr>
        <tr>
            <td><?php echo lang('email'); ?></td>
            <td>
                <?php if (form_error('email') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('email'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="email" size="35" maxlength="40" value="<?php echo set_value('email', $profile_data->email); ?>" readonly="readonly" /></td>
        </tr>
      	<tr>
            <td><?php echo lang('first_name'); ?></td>
            <td>
                <?php if (form_error('first_name') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('first_name'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="first_name" size="35" maxlength="40" value="<?php echo set_value('first_name', $profile_data->first_name); ?>" /></td>
        </tr>
        <tr>
            <td><?php echo lang('last_name'); ?></td>
            <td>
                <?php if (form_error('last_name') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('last_name'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="last_name" size="35" maxlength="40" value="<?php echo set_value('last_name', $profile_data->last_name); ?>" /></td>
        </tr>
        <tr>
        	<td><?php echo lang('gender')?></td>
        	<td>
        		
        		<?php if (form_error('gender') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('gender'), '<p>', '</p>'); ?></div> <?php } ?>
        		<?php echo form_dropdown('gender', $dd_gender, set_value('gender', $profile_data->gender )); ?>
        	</td>
        </tr>
        <tr>
            <td><?php echo lang('dob'); ?></td>
            <td>
              <?php echo $formdate->selectDay()?>    
			  <?php echo $formdate->selectMonth()?>    
			  <?php echo $formdate->selectYear()?>    
            </td>
        </tr>
        
        <tr>
            <td><?php echo lang('phone'); ?></td>
            <td>
                <?php if (form_error('telephone') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('telephone'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="telephone" size="35" maxlength="40" value="<?php echo set_value('telephone', $profile_data->telephone); ?>" /></td>
        </tr>
        <tr>
            <td><?php echo lang('mobile'); ?></td>
            <td>
                <?php if (form_error('mobilephone') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('mobilephone'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="mobilephone" size="35" maxlength="40" value="<?php echo set_value('mobilephone', $profile_data->mobilephone); ?>" /></td>
        </tr>
        
        <tr>
            <td><?php echo lang('address'); ?></td>
            <td>
                <?php if (form_error('address') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('address'), '<p>', '</p>'); ?></div> <?php } ?>
                <input type="text" class="form_input" name="address" size="35" maxlength="40" value="<?php echo set_value('address', $profile_data->address); ?>" /></td>
        </tr>
            
        <tr>
        	<td><?php echo lang('company')?></td>
        	<td>
        		
        		<?php if (form_error('company') != "") {
                ?> <div class="form_error"><?php echo generate_pure_text(form_error('company'), '<p>', '</p>'); ?></div> <?php } ?>
        		<?php echo form_dropdown('company', $dd_company, set_value('company', $profile_data->company )); ?>
        	</td>
        </tr>
       
       
       
        <tr>
            <td colspan="2"><input type="submit" name="submit" value="<?php echo lang('edit_profile')?>" class="form_submit" /></td>
        </tr>
    </table>
    <?php echo form_close(); ?>
</div>